<?php
/**
 * Created by PhpStorm.
 * User: junyv
 * Date: 2017/4/6
 * Time: 8:57
 */

namespace app\manage\controller;


class Demand extends Base
{
    protected $beforeActionList = [
        'beforeIndex'  =>  ['only'=>'index'],
    ];
    public function beforeIndex(){
        $this->_ajaxedit = true;
    }
    public function _search(){
        $status = -1;
        $where  = [];
        if(isset($_GET['status']) && $_GET['status'] !== ''){
            $status = input('get.status/d');
        }
        $status>=0 && $where['status'] = ['eq',$status];
        $this->assign('search',[
            'status' => $status,
        ]);
        return $where;
    }
}